import { createRouter, createWebHashHistory } from 'vue-router'

import home from '@/pages/home/home.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: home
  },
  {
    path: '/jsBase-event',
    name: 'jsBase-event',
    component: () => import('@/codes/jsBase-event.vue')
  },
  {
    path: '/jsBase-functionCall',
    name: 'jsBase-functionCall',
    component: () => import('@/codes/jsBase-functionCall.vue')
  },
  {
    path: '/algor-lengthOfLongestSubstring',
    name: 'algor-lengthOfLongestSubstring',
    component: () => import('@/codes/algor-lengthOfLongestSubstring.vue')
  },
  {
    path: '/algor-strArrange',
    name: 'algor-strArrange',
    component: () => import('@/codes/algor-strArrange.vue')
  },
  {
    path: '/algor-strOthers',
    name: 'algor-strOthers',
    component: () => import('@/codes/algor-strOthers.vue')
  },
  {
    path: '/algor-threeSum',
    name: 'algor-threeSum',
    component: () => import('@/codes/algor-threeSum.vue')
  },
  {
    path: '/algor-friendCircle',
    name: 'algor-friendCircle',
    component: () => import('@/codes/algor-friendCircle.vue')
  },
  {
    path: '/jsBase-eventLoop',
    name: 'jsBase-eventLoop',
    component: () => import('@/codes/jsBase-eventLoop.vue')
  },
  {
    path: '/jsBase-async',
    name: 'jsBase-async',
    component: () => import('@/codes/jsBase-async.vue')
  },
  {
    path: '/jsBase-prototype',
    name: 'jsBase-prototype',
    component: () => import('@/codes/jsBase-prototype.vue')
  },
  {
    path: '/jsBase-object',
    name: 'jsBase-object',
    component: () => import('@/codes/jsBase-object.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router